/** 查询登陆日志列表 */
export function listLogininforApi(query: LogininforRecord): Promise<ApiRowsRecord<LogininforRecord[]>> {
  return request({
    url: `monitor/logininfor/list`,
    method: 'get',
    params: query
  });
}

/** 查询登陆日志详细 */
export function getLogininforApi(id: number): Promise<ApiDataRecord<LogininforRecord>> {
  return request({
    url: `monitor/logininfor/${id}`,
    method: 'get'
  });
}

/** 新增登陆日志 */
export function addLogininforApi(data: LogininforRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/logininfor",
    method: 'post',
    data: data
  });
}

/** 修改登陆日志 */
export function updateLogininforApi(data: LogininforRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/logininfor",
    method: 'put',
    data: data
  });
}

/** 删除登陆日志 */
export function delLogininforApi(id: number[]): Promise<ApiRecord> {
  return request({
    url: `monitor/logininfor/${id}`,
    method: 'delete',
  });
}

/** 解锁用户登录状态 */
export function unlockLogininforApi(userName: string): Promise<ApiRecord> {
  return request({
    url: '/monitor/logininfor/unlock/' + userName,
    method: 'get'
  })
}

/** 清空登录日志 */
export function cleanLogininforApi(): Promise<ApiRecord> {
  return request({
    url: '/monitor/logininfor/clean',
    method: 'delete'
  })
}